<extend name="Public/baseConf" />
<block name="breadcrumb"> 
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-4">
	        <h2>权限管理</h2>
	        <ol class="breadcrumb">
	            <li><a href="{:U('index/index')}">首页</a></li>
	            <li class="active">
	                <strong>权限管理</strong>
	            </li>
	        </ol>
	    </div>
	    <div class="col-lg-8">
            <div class="title-action">
				<span class="block pull-right">
					<a class="btn btn-primary" href="{:U('createGroup')}">
						<i class="fa fa-pencil align-top"></i>新增
					</a>
					<button class="btn btn-primary btn-success ajax-post" url="{:U('changestatus?method=resumeGroup')}" target-form="ids">
						<i class="fa fa-flag"></i>启用
					</button>
			        <button class="btn ajax-post" url="{:U('changestatus?method=forbidGroup')}" target-form="ids">
						<i class="fa fa-flag"></i>禁用
					</button> 
			        <button class="btn btn-danger ajax-post" url="{:U('changestatus?method=deleteGroup')}" target-form="ids">
						<i class="fa fa-trash align-top"></i>删 除
					</button>
				</span>
            </div>
        </div>
	</div>
</block>

<block name="body">
<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>权限管理</h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                </div>
            </div>
            <div class="ibox-content">
                <div class="table-responsive">
	                 <form class="ids">
		                 <table class="table table-striped table-bordered table-hover dataTables-example" >
		                  <thead>
		                  <tr>
								<th class="center row-selected row-selected">
								<label><input type="checkbox" class="check-all" /><span class="lbl"></span></label></th>
								<th class="center">操作</th>
								<th class="center">用户组</th>
								<th class="center">描述</th>
								<th class="center">授权</th>
								<th class="center">状态</th>
								<th></th>
		                  </tr>
		                  </thead>
		                  <tbody>
								<notempty name="_list">
								<volist name="_list" id="vo">
								<tr>
						            <td class="center">
										<label>
											<input type="checkbox" class="ids row-selected" name="id[]" value="{$vo.id}"/>
											<span class="lbl"></span>
										</label>
									</td>
									<td class="center"><eq name="vo.status" value="1">
										<a title="禁用" class="grey ajax-get" href="{:U('AuthManager/changeStatus?method=forbidGroup&id='.$vo['id'])}"><i class='fa fa-flag bigger-130'></i></a>&nbsp;&nbsp;
										<else/>
										<a title="启用" class="blue ajax-get" href="{:U('AuthManager/changeStatus?method=resumeGroup&id='.$vo['id'])}"><i class='fa fa-flag bigger-130'></i></a>&nbsp;&nbsp;
										</eq>
						                <a title="删除" class="red ajax-get" href="{:U('AuthManager/changeStatus?method=deleteGroup&id='.$vo['id'])}"><i class='fa fa-trash-o bigger-130'></i></a>
						            </td>
									<td><a href="{:U('AuthManager/editgroup?id='.$vo['id'])}">{$vo.title}</a> </td>
									<td><span>{:mb_strimwidth($vo['description'],0,60,"...","utf-8")}</span></td>
									<td class="center">
										<a href="{:U('AuthManager/access?group_name='.$vo['title'].'&group_id='.$vo['id'])}" ><span class='label label-info'>访问授权</span></a>
			 							<a href="{:U('AuthManager/category?group_name='.$vo['title'].'&group_id='.$vo['id'])}" ><span class='label label-warning'>分类授权</span></a>
										<a href="{:U('AuthManager/user?group_name='.$vo['title'].'&group_id='.$vo['id'])}" ><span class='label label-success'>成员授权</span></a>
									</td>
									<td class="center">{$vo.status_text}</td>
						            <td></td>
								</tr>
								</volist>
								<else/> 
								<td colspan="11" class="text-center"> aOh! 暂时还没有内容! </td>
								</notempty>
		                  </tbody>
		                 </table>
		           	</form>
		           	<div class="page pull-right">
			     	{$_page}
		 			</div>
	            </div>
            </div>
        </div>
    </div>
</div>
</block>
